package com.eightbears.beboy.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.eightbears.beboy.entity.ClassifyEntity;
import com.eightbears.beboy.R;
import com.eightbears.beboy.base.view.popupwindow.ClassifyPopup;

import java.util.List;

/**
 *
 */

public class SearchClassifyAdapter extends BaseQuickAdapter<ClassifyEntity, BaseViewHolder> {

    public SearchClassifyAdapter() {
        super(R.layout.item_search_shop_classify, null);
        List<ClassifyEntity> classifyEntities = ClassifyPopup.initData();
        classifyEntities.remove(classifyEntities.size()-1);
        setNewData(classifyEntities);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, ClassifyEntity classifyEntity) {
        baseViewHolder.setText(R.id.tv_classes_name, classifyEntity.getClassifyName())
                .addOnClickListener(R.id.ll_class);
    }
}
